//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//
//
#ifndef Green_RegisterInitData_H
#define Green_RegisterInitData_H

#include "Defines.h"

namespace Green {

  class Generator;
  class OperandDataRequest;
  class Data;
  class DataPattern;
  class Register;

  /*!
    \class RegisterInitData
    \brief A class to help managing register data
  */

  class RegisterInitData {
  public:
    RegisterInitData(): mpDataRequest(nullptr), mpData(nullptr) { }  //!< Constructor
    ~RegisterInitData() { }

    ASSIGNMENT_OPERATOR_ABSENT(RegisterInitData);
    COPY_CONSTRUCTOR_DEFAULT(RegisterInitData);
    void Setup(const Generator& gen, const Register *pRegister, const OperandDataRequest *pDataRequest); //!< set up constraint.
    void Commit(const Generator& gen, Register* pRegister); //!< Commit data to generator.
    void Cleanup(); //!< do some clean up
  private:
    const OperandDataRequest* mpDataRequest; //!< pointer to data request
    const Data *mpData; //!< pointer to data
  };

}

#endif
